{%- comment -%}

  Usage:
    {%- capture container_class -%}
      {%- render 'section-space',
        section_margin_top: section.settings.section_margin_top,
        section_padding_top: section.settings.section_padding_top,
        section_padding_bottom: section.settings.section_padding_bottom
      -%}
    {%- endcapture -%}
{%- endcomment -%}

{%- liquid
  assign section_spacing_class = ''

  if section_margin_top != blank
    case section_margin_top
      when 'none'
        assign section_spacing_class = section_spacing_class | append: ' mt-0'
      when 'small'
        assign section_spacing_class = section_spacing_class | append: ' mt-section-sm'
      when 'mediumn'
        assign section_spacing_class = section_spacing_class | append: ' mt-section'
      else
        assign section_spacing_class = section_spacing_class | append: ' mt-section-lg'
    endcase
  endif

  if section_padding_top != blank
    case section_padding_top
      when 'none'
        assign section_spacing_class = section_spacing_class | append: ' pt-0'
      when 'small'
        assign section_spacing_class = section_spacing_class | append: ' pt-section-sm'
      when 'mediumn'
        assign section_spacing_class = section_spacing_class | append: ' pt-section'
      else
        assign section_spacing_class = section_spacing_class | append: ' pt-section-lg'
    endcase
  endif

  if section_padding_bottom != blank
    case section_padding_bottom
      when 'none'
        assign section_spacing_class = section_spacing_class | append: ' pb-0'
      when 'small'
        assign section_spacing_class = section_spacing_class | append: ' pb-section-sm'
      when 'mediumn'
        assign section_spacing_class = section_spacing_class | append: ' pb-section'
      else
        assign section_spacing_class = section_spacing_class | append: ' pb-section-lg'
    endcase
  endif
-%}
{{ section_spacing_class }}